package com.zlm.common.dto;

import org.apache.poi.ss.usermodel.BorderStyle;

import java.io.Serializable;

/**
 * Excel单元格
 * @author xhj
 */
public class ExcelCellDto implements Serializable {

    private static final long serialVersionUID = -4368935205737517731L;

    public static final String VALUE = "value";
    public static final String ROWSPAN = "rowspan";
    public static final String COLSPAN = "colspan";
    public static final String COLOR = "color";
    public static final String BOLD = "bold";
    public static final String BORDER = "border";
    public static final String FONT_SIZE = "fontSize";
    public static final String FONT_FAMILY = "fontFamily";

    public static final String HORIZONTAL_ALIGN = "horizontalAlign";
    public static final String VERTICAL_ALIGN = "verticalAlign";
    public static final String WRAP = "wrap";
    public static final String BG_COLOR = "bgColor";
    public static final String IS_PERCENT = "isPercent";

    public static final String PERCENT_FORMAT = "0.00%";

    private String value = "";

    private Integer rowspan;

    private Integer colspan;

    /**
     * 8-64 也可以用类似HSSFColor.BLUE.index（蓝色）代替
     */
    private Short color;

    private Boolean bold;

    private BorderStyle border;

    private Short fontSize;

    private String fontFamily;

    /**
     * 水平对齐 center/right/left
     */
    private String horizontalAlign;

    /**
     * 垂直对齐 middle/top/bottom
     */
    private String verticalAlign;

    /**
     * 是否自动换行
     */
    private Boolean wrap;

    private Short bgColor;

    /**
     * 是否为百分数格式
     */
    private Boolean isPercent;

    public String getValue() {
        return value;
    }

    public ExcelCellDto setValue(String value) {
        this.value = value;
        return this;
    }

    public Integer getRowspan() {
        return rowspan;
    }

    public ExcelCellDto setRowspan(Integer rowspan) {
        this.rowspan = rowspan;
        return this;
    }

    public Integer getColspan() {
        return colspan;
    }

    public ExcelCellDto setColspan(Integer colspan) {
        this.colspan = colspan;
        return this;
    }

    public Short getColor() {
        return color;
    }

    public ExcelCellDto setColor(Short color) {
        this.color = color;
        return this;
    }

    public Boolean getBold() {
        return bold;
    }

    public ExcelCellDto setBold(Boolean bold) {
        this.bold = bold;
        return this;
    }

    public BorderStyle getBorder() {
        return border;
    }

    public ExcelCellDto setBorder(BorderStyle border) {
        this.border = border;
        return this;
    }

    public Short getFontSize() {
        return fontSize;
    }

    public ExcelCellDto setFontSize(Short fontSize) {
        this.fontSize = fontSize;
        return this;
    }

    public String getFontFamily() {
        return fontFamily;
    }

    public ExcelCellDto setFontFamily(String fontFamily) {
        this.fontFamily = fontFamily;
        return this;
    }

    public String getHorizontalAlign() {
        return horizontalAlign;
    }

    public ExcelCellDto setHorizontalAlign(String horizontalAlign) {
        this.horizontalAlign = horizontalAlign;
        return this;
    }

    public String getVerticalAlign() {
        return verticalAlign;
    }

    public ExcelCellDto setVerticalAlign(String verticalAlign) {
        this.verticalAlign = verticalAlign;
        return this;
    }

    public Boolean getWrap() {
        return wrap;
    }

    public ExcelCellDto setWrap(Boolean wrap) {
        this.wrap = wrap;
        return this;
    }

    public Short getBgColor() {
        return bgColor;
    }

    public ExcelCellDto setBgColor(Short bgColor) {
        this.bgColor = bgColor;
        return this;
    }

    public Boolean getIsPercent() {
        return isPercent;
    }

    public ExcelCellDto setIsPercent(Boolean isPercent) {
        this.isPercent = isPercent;
        return this;
    }
}
